package com.springboot.service.impl;


import com.springboot.mapper.MessageInformMapper;
import com.springboot.mapper.UserLoginFormMapper;
import com.springboot.model.MessageInform;
import com.springboot.model.UserLoginForm;
import com.springboot.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private UserLoginFormMapper userLoginFormMapper;

    @Autowired
    private MessageInformMapper messageInformMapper;

    @Override
    public UserLoginForm findUserByTel(String userTel)
    {
        return userLoginFormMapper.selectByTel(userTel);
    }

    @Override
    public ArrayList<MessageInform> findMessageById(Integer userId)
    {
        return messageInformMapper.selectByDoctorId(userId);
    }
}
